package com.cap.bts.crmdp.dealer.meal.service;

import java.util.List;
import java.util.Map;

import com.cap.bts.crmdp.dealer.meal.domain.MealModel;
import com.cap.bts.crmdp.dealer.meal.domain.MeallineModel;
import com.cap.bts.crmdp.dealer.meal.domain.PackageDealerSelected;
import com.cap.bts.crmdp.dealer.meal.domain.PackageEligibilityModel;
import com.cap.bts.crmdp.dealer.meal.dto.MealDefineDto;
import com.cap.bts.crmdp.dealer.meal.dto.MealLineResultDto;
import com.cap.bts.crmdp.dealer.meal.dto.PackageEligibilityDto;
import com.cap.bts.crmdp.dealer.packagegift.dto.MermberGiftDto;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.service.IBaseService;

/**
 * 套餐管理业务处理接口
 * 
 * @author liZhiYong
 * @version $Id: MealDdefineService.java, v 0.1 2015-9-14 下午3:51:27 1111 Exp $
 */
public interface IMealManageService extends IBaseService {

    /**
     * 套餐信息查询
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public List<MealModel> getMealLIst(MealDefineDto dto) throws AppException;

    /**
     * 新增套餐信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public MealDefineDto insertMealInfo(MealDefineDto dto) throws AppException;

    /**
     * 新增套餐的详细信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public MeallineModel insertMealLineInfo(MealDefineDto dto) throws AppException;

    /**
     * 根据套餐编号查询套餐信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public MealModel getMealInfoByCode(MealDefineDto dto) throws AppException;

    /**
     * 根据套餐ID修改套餐信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean updateMealInfo(MealDefineDto dto) throws AppException;

    /**
     * 修改套餐的详细信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean updateMealLineInfo(MealDefineDto dto) throws AppException;

    /**
     * 根据套餐ID查询套餐信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public MealModel getMealInfoById(MealDefineDto dto) throws AppException;

    /**
     * 根据套餐ID查询套餐详细信息
     * 
     * @param dto
     * @return
     * @throws AppException
     */
    public List<MealLineResultDto> getMeallineList(MealDefineDto dto) throws AppException;

    /**
     * 删除套餐信息
     * 
     * @param id
     * @throws AppException
     */
    public void removeMealById(Long id) throws AppException;

    /**
     * 根据套餐详细信息的ID查询套餐详细信息
     * @param id
     * @return
     * @throws AppException
     */
    public MeallineModel getMealLIneInfo(Long id) throws AppException;

    /**
     * 根据套餐的ID查询套餐详细信息
     * @param packageDefId
     * @return
     * @throws AppException
     */
    public List<MeallineModel> getMealLIneInfoByPackageId(Long packageDefId) throws AppException;

    /**
     * 根据套餐ID删除套餐详细信息
     * @param packageDefId
     * @throws AppException
     */
    public void removeMealLineByPackageDefId(Long packageDefId) throws AppException;

    /**
     * 根据套餐详细信息的ID删除套餐详细信息
     * @param id
     * @throws AppException
     */
    public void removeMealLineById(Long id) throws AppException;

    /**
     * 根据N个条件查询套餐信息
     * @param mealDefineDto
     * @return
     * @throws AppException
     */
    public List<MealModel> getMealModelListByParams(MealDefineDto mealDefineDto)
                                                                                throws AppException;

    /**
     * 入会礼新增
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean saveMermberGiftInfo(MermberGiftDto dto) throws AppException;

    /**
     * 入会礼删除
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean removeMermberGift(MermberGiftDto dto) throws AppException;

    /**
     * 套餐复制
     * @param dto
     * @return
     * @throws AppException
     */
    public Map<String, Object> saveCopyMealInfo(MealDefineDto dto) throws AppException;

    /**
     * 根据套餐ID删除入会礼信息
     * @param packageDefId
     * @throws AppException
     */
    public void removeMemberGiftByPackageId(Long packageDefId) throws AppException;

    /**
     * 根据优惠券和提货券的ID查询套餐详细信息
     * @param ticketDefId
     * @return
     * @throws AppException
     */
    public List<MeallineModel> getMeallineListByTicketDefId(Long ticketDefId) throws AppException;

    /**
     * 套餐启用或者停用
     * @param dto
     * @return
     * @throws AppException
     */
    public boolean packageEnabled(MealDefineDto dto) throws AppException;

    /**
     * 查询套餐的适用范围信息
     * @param packageEligibilityDto
     * @return
     * @throws AppException
     */
    public List<PackageEligibilityModel> getPackageEligibilityList(PackageEligibilityDto packageEligibilityDto)
                                                                                                               throws AppException;

    /**
     * 新增套餐的适用范围信息
     * @param packageEligibilityDto
     * @return
     * @throws AppException
     */
    public void insertPackageEligibilityInfo(PackageEligibilityDto packageEligibilityDto)
                                                                                                            throws AppException;

    /**
     * 删除套餐的适用范围信息
     * @param packageEligibilityDto
     * @return
     * @throws AppException
     */
    public boolean removePackageEligibilityInfo(PackageEligibilityDto packageEligibilityDto)
                                                                                            throws AppException;

    /**
     * 根据套餐ID,Dealer_property,Property_value查询套餐的适用范围
     * @param packageEligibilityDto
     * @return
     * @throws AppException
     */
    public PackageEligibilityModel getPackageEligibilityInfoByPackageDefId(PackageEligibilityDto packageEligibilityDto)
                                                                                                       throws AppException;
    
    /**
     * @param dto
     * @return
     * @throws AppException
     */
    public void savePackageSelected(PackageDealerSelected obj)throws AppException;
    
    public void removePackageSelected(String dealerId)throws AppException;
    
    public List<PackageDealerSelected> getPackageSelected(String packageDefId,String dealerId) throws AppException;
}
